<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PID plotter component: /home/vedant/Programming/projects/pid-tuning-gui/esp_codes/components/pid_plotter/json_handler.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PID plotter component
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP-IDF component for pid plotter</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">/home/vedant/Programming/projects/pid-tuning-gui/esp_codes/components/pid_plotter/json_handler.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="json__handler_8h_source.html">json_handler.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for json_handler.c:</div>
<div class="dyncontent">
<div class="center"><img src="json__handler_8c__incl.png" border="0" usemap="#_2home_2vedant_2_programming_2projects_2pid-tuning-gui_2esp__codes_2components_2pid__plotter_2json__handler_8c" alt=""/></div>
<map name="_2home_2vedant_2_programming_2projects_2pid-tuning-gui_2esp__codes_2components_2pid__plotter_2json__handler_8c" id="_2home_2vedant_2_programming_2projects_2pid-tuning-gui_2esp__codes_2components_2pid__plotter_2json__handler_8c">
<area shape="rect" id="node2" href="json__handler_8h.html" title="json_handler.h" alt="" coords="45,124,151,151"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a229aa3d7fb017d31499a5e29b78b7f08"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__handler_8c.html#a229aa3d7fb017d31499a5e29b78b7f08">create_pid_data_to_json</a> (float current, float error, float P, float I, float D)</td></tr>
<tr class="memdesc:a229aa3d7fb017d31499a5e29b78b7f08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts PID data to a json string.  <a href="#a229aa3d7fb017d31499a5e29b78b7f08">More...</a><br /></td></tr>
<tr class="separator:a229aa3d7fb017d31499a5e29b78b7f08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a00fbe2cfe762fae40bd73932ddb072"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structpid__const.html">pid_const</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__handler_8c.html#a5a00fbe2cfe762fae40bd73932ddb072">read_pid_data_from_json</a> (const char *data)</td></tr>
<tr class="memdesc:a5a00fbe2cfe762fae40bd73932ddb072"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads PID constant data from a json formatted string.  <a href="#a5a00fbe2cfe762fae40bd73932ddb072">More...</a><br /></td></tr>
<tr class="separator:a5a00fbe2cfe762fae40bd73932ddb072"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a229aa3d7fb017d31499a5e29b78b7f08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a229aa3d7fb017d31499a5e29b78b7f08">&#9670;&nbsp;</a></span>create_pid_data_to_json()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* create_pid_data_to_json </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>current</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>error</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>I</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>D</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts PID data to a json string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">current</td><td>current value </td></tr>
    <tr><td class="paramname">error</td><td>error value, deviation of current from setpoint </td></tr>
    <tr><td class="paramname">P</td><td>Value of Proportional Gain (P) </td></tr>
    <tr><td class="paramname">I</td><td>Value of Integral Gain (I) </td></tr>
    <tr><td class="paramname">D</td><td>Value of Derivative Gain (D) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>char* - Json string of the data sent through parameters. </dd></dl>

</div>
</div>
<a id="a5a00fbe2cfe762fae40bd73932ddb072"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a00fbe2cfe762fae40bd73932ddb072">&#9670;&nbsp;</a></span>read_pid_data_from_json()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structpid__const.html">pid_const</a> read_pid_data_from_json </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads PID constant data from a json formatted string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Pointer to char array containging the json formatted string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>struct <a class="el" href="structpid__const.html">pid_const</a> - Returns a array of PID constants, extracted from the json string </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
